export default {
  namespaced: true,
  state: {
    // 是否隐藏ert title
    showTitlebar: true,
    // 系统皮肤, light(浅色) / dark(黑色)
    layoutSkin: 'light',
    // 页面文档可视高度(随窗口改变大小)
    documentClientHeight: 0,
    // 导航条, 布局风格, defalut(默认) / inverse(反向)
    navbarLayoutType: 'default',
    // 侧边栏, 布局皮肤, light(浅色) / dark(黑色)
    sidebarLayoutSkin: 'dark',
    // dark下echart color
    echartDarkColor: '#4B9BD7',
    // light下echart color
    echartLightColor: '#646464',
    // dark下echart文字 color
    echartDarkWord: '#fff',
    // light下echart文字 color
    echartLightWord: '#000',
    echartLightSplitLineColor: '#C8C8C8',
    echartDarkSplitLineColor: '#4B9BD7',
    // 侧边栏, 折叠状态
    sidebarFold: false,
    // 侧边栏, 菜单
    menuList: [],
    // 顶部菜单
    topMenuList: [],
    // 顶部菜单当前高亮
    topMenuaActiveIndex: '0',

    menuActiveName: '',
    // 内容, 是否需要刷新
    contentIsNeedRefresh: true,
    // 主入口标签页
    mainTabs: [],
    mainTabsActiveName: ''
  },
  mutations: {
    updateDocumentClientHeight(state, height) {
      state.documentClientHeight = height;
    },
    updateNavbarLayoutType(state, type) {
      state.navbarLayoutType = type;
    },
    updateSidebarLayoutSkin(state, skin) {
      state.sidebarLayoutSkin = skin;
    },
    updateLayoutSkin(state, skin) {
      state.layoutSkin = skin;
    },
    updateSidebarFold(state, fold) {
      state.sidebarFold = fold;
    },
    updateMenuList(state, list) {
      state.menuList = list;
    },
    updateTopMenuList(state, list) {
      state.topMenuList = list;
    },
    updateTopMenuActiveIndex(state, index) {
      state.topMenuaActiveIndex = index;
    },
    updateMenuActiveName(state, name) {
      state.menuActiveName = name;
    },
    updateContentIsNeedRefresh(state, status) {
      state.contentIsNeedRefresh = status;
    },
    updateMainTabs(state, tabs) {
      state.mainTabs = tabs;
    },
    updateMainTabsActiveName(state, name) {
      state.mainTabsActiveName = name;
    },
    updateShowTitlebar(state, value) {
      state.showTitlebar = value;
    }
  }
};
